# -*- coding: utf-8 -*-
"""
Created on Tue Dec  5 21:50:58 2017

@author: Administrator

获取A股所有股票代码

"""
import tushare as ts

stock_info=ts.get_stock_basics(date=None)
def get_all_stock_id(date=None):
    #获取所有股票代码
    for i in stock_info.index:
        print(i)
    
stock_info.to_csv('./oc_data/codes2017.csv')
        
if __name__ == '__main__':
    #get_all_stock_id('2017-01-01')
    print('finish!')